<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="content_v2_1.html">Content API for Shopping</a> . <a href="content_v2_1.recommendations.html">recommendations</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#generate">generate(merchantId, allowedTag=None, languageCode=None, x__xgafv=None)</a></code></p>
<p class="firstline">Generates recommendations for a merchant.</p>
<p class="toc_element">
  <code><a href="#reportInteraction">reportInteraction(merchantId, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Reports an interaction on a recommendation for a merchant.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="generate">generate(merchantId, allowedTag=None, languageCode=None, x__xgafv=None)</code>
  <pre>Generates recommendations for a merchant.

Args:
  merchantId: string, Required. The ID of the account to fetch recommendations for. (required)
  allowedTag: string, Optional. List of allowed tags. Tags are a set of predefined strings that describe the category that individual recommendation types belong to. User can specify zero or more tags in this field to indicate what categories of recommendations they want to receive. Current list of supported tags: - TREND (repeated)
  languageCode: string, Optional. Language code of the client. If not set, the result will be in default language (English). This language code affects all fields prefixed with &quot;localized&quot;. This should be set to ISO 639-1 country code. List of currently verified supported language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response containing generated recommendations.
  &quot;recommendations&quot;: [ # Recommendations generated for a request.
    { # Recommendations are suggested ways to improve your merchant account&#x27;s performance. For example, to engage with a feature, or start using a new Google product.
      &quot;additionalCallToAction&quot;: [ # Output only. CTAs of this recommendation. Repeated.
        { # Call to action (CTA) that explains how a merchant can implement this recommendation
          &quot;intent&quot;: &quot;A String&quot;, # Output only. Intent of the action. This value describes the intent (for example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from recommendation to recommendation. This value can change over time for the same recommendation. Currently available intent values: - OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: Opens a user journey where they can [create a collection](https://support.google.com/merchants/answer/9703228) for their Merchant account. (No default URL)
          &quot;localizedText&quot;: &quot;A String&quot;, # Output only. Localized text of the CTA. Optional.
          &quot;uri&quot;: &quot;A String&quot;, # Optional. URL of the CTA. This field will only be set for some recommendations where there is a suggested landing URL. Otherwise it will be set to an empty string. We recommend developers to use their own custom landing page according to the description of the intent field above when this uri field is empty.
        },
      ],
      &quot;additionalDescriptions&quot;: [ # Output only. List of additional localized descriptions for a recommendation. Localication uses the `languageCode` field in `GenerateRecommendations` requests. Not all description types are guaranteed to be present and we recommend to rely on default description.
        { # Google-provided description for the recommendation.
          &quot;text&quot;: &quot;A String&quot;, # Output only. Text of the description.
          &quot;type&quot;: &quot;A String&quot;, # Output only. Type of the description.
        },
      ],
      &quot;creative&quot;: [ # Output only. Any creatives attached to the recommendation. Repeated.
        { # Creative is a multimedia attachment to recommendation that can be used on the frontend.
          &quot;type&quot;: &quot;A String&quot;, # Type of the creative.
          &quot;uri&quot;: &quot;A String&quot;, # URL of the creative.
        },
      ],
      &quot;defaultCallToAction&quot;: { # Call to action (CTA) that explains how a merchant can implement this recommendation # Optional. Default CTA of the recommendation.
        &quot;intent&quot;: &quot;A String&quot;, # Output only. Intent of the action. This value describes the intent (for example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from recommendation to recommendation. This value can change over time for the same recommendation. Currently available intent values: - OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: Opens a user journey where they can [create a collection](https://support.google.com/merchants/answer/9703228) for their Merchant account. (No default URL)
        &quot;localizedText&quot;: &quot;A String&quot;, # Output only. Localized text of the CTA. Optional.
        &quot;uri&quot;: &quot;A String&quot;, # Optional. URL of the CTA. This field will only be set for some recommendations where there is a suggested landing URL. Otherwise it will be set to an empty string. We recommend developers to use their own custom landing page according to the description of the intent field above when this uri field is empty.
      },
      &quot;defaultDescription&quot;: &quot;A String&quot;, # Optional. Localized recommendation description. The localization the {@link `GenerateRecommendationsRequest.language_code`} field in {@link `GenerateRecommendationsRequest`} requests.
      &quot;numericalImpact&quot;: 42, # Optional. A numerical score of the impact from the recommendation&#x27;s description. For example, a recommendation might suggest an upward trend in sales for a certain product. Higher number means larger impact.
      &quot;paid&quot;: True or False, # Optional. Indicates whether a user needs to pay when they complete the user journey suggested by the recommendation.
      &quot;recommendationName&quot;: &quot;A String&quot;, # Optional. Localized recommendation name. The localization uses the {@link `GenerateRecommendationsRequest.language_code`} field in {@link `GenerateRecommendationsRequest`} requests.
      &quot;subType&quot;: &quot;A String&quot;, # Optional. Subtype of the recommendations. Only applicable when multiple recommendations can be generated per type, and is used as an identifier of recommendation under the same recommendation type.
      &quot;title&quot;: &quot;A String&quot;, # Optional. Localized Recommendation Title. Localization uses the {@link `GenerateRecommendationsRequest.language_code`} field in {@link `GenerateRecommendationsRequest`} requests.
      &quot;type&quot;: &quot;A String&quot;, # Output only. Type of the recommendation. List of currently available recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - OPPORTUNITY_CREATE_EMAIL_CAMPAIGN
    },
  ],
  &quot;responseToken&quot;: &quot;A String&quot;, # Output only. Response token is a string created for each `GenerateRecommendationsResponse`. This token doesn&#x27;t expire, and is globally unique. This token must be used when reporting interactions for recommendations.
}</pre>
</div>

<div class="method">
    <code class="details" id="reportInteraction">reportInteraction(merchantId, body=None, x__xgafv=None)</code>
  <pre>Reports an interaction on a recommendation for a merchant.

Args:
  merchantId: string, Required. The ID of the account that wants to report an interaction. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to report interactions on a recommendation.
  &quot;interactionType&quot;: &quot;A String&quot;, # Required. Type of the interaction that is reported, for example INTERACTION_CLICK.
  &quot;responseToken&quot;: &quot;A String&quot;, # Required. Token of the response when recommendation was returned.
  &quot;subtype&quot;: &quot;A String&quot;, # Optional. Subtype of the recommendations this interaction happened on. This field must be set only to the value that is returned by {@link `RecommendationsService.GenerateRecommendations`} call.
  &quot;type&quot;: &quot;A String&quot;, # Required. Type of the recommendations on which this interaction happened. This field must be set only to the value that is returned by {@link `GenerateRecommendationsResponse`} call.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
</pre>
</div>

</body></html>